﻿using EntityFramework.Entity.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YouTravel.Framework.Enums;

namespace YouTravel.DomainModels
{
    /// <summary>
    /// 帐号信息
    /// </summary>
    public class User : EntityBase
    {
        /// <summary>
        /// 用户名
        /// 员工登录账号(唯一)(小于20)
        /// </summary>
        public string Login { get; set; }
        /// <summary>
        /// 密码
        /// 员工登录密码(小于20)(默认6个0)
        /// </summary>
        public string PassWord { get; set; }
        /// <summary>
        /// 真实姓名
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 是否专线管理员
        /// true-管理员 false-操作员
        /// </summary>
        public bool IsSpecialManager { get; set; }
        /// <summary>
        /// 帐号类型
        /// </summary>
        public UserType Type { get; set; }
        /// <summary>
        /// 帐号状态
        /// 1-正常 2-冻结 3-已销户
        /// </summary>
        public UserStatus Status { get; set; }
        /// <summary>
        /// 手机号码
        /// </summary>
        public string Phone { get; set; }

        /// <summary>
        /// 所属机构ID
        /// </summary>
        public int? BranchId { get; set; }
        /// <summary>
        /// 所属机构
        /// </summary>
        public virtual Branch Branch { get; set; }
        /// <summary>
        /// 专线ID
        /// </summary>
        public int? SpecialId { get; set; }
        /// <summary>
        /// 专线
        /// </summary>
        public virtual Special Special { get; set; }
        /// <summary>
        /// 菜单列表
        /// </summary>
        public virtual ICollection<Menu> Menus { get; set; }
        /// <summary>
        /// 创建人Id
        /// </summary>
        public int? CreaterId { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        public virtual User Creater { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateTime { get; set; }
        /// <summary>
        /// 更新人Id
        /// </summary>
        public int? UpdaterId { get; set; }
        /// <summary>
        /// 更新人
        /// </summary>
        public virtual User Updater { get; set; }
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }
        

    }
}
